class student{
    String name;
    int age;
    char mlx;

    //构造函数给三个属性赋初值
    public student(String name, int age, char mlx) {
        this.name = name;
        this.age = age;
        this.mlx = mlx;
    }
    //构造函数给三个属性赋初值
    public student(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public char getMlx() {
        return mlx;
    }

    public void setMlx(char mlx) {
        this.mlx = mlx;
    }

    @Override
    public String toString() {
        return "student{" +
                " 名字='" + name + '\'' +
                " 年龄=" + age +
                " 编号=" + mlx +
                '}';
    }
}

public class javademo {
    public static void main(String[] args) {
        student stu1=new student("李华",66,'a');
        System.out.println(stu1);
    }
}
